<div id="content" ng-app="SJ-APP">
    <div class="outer" ng-controller="contest_work_list_controller">
        <div class="inner bg-light lter">
            <div class="row">
                <div class="col-lg-12">
                    <div class="box">
                        <header>
                            <div class="icons">
                                <i class="fa icon-file"></i>
                            </div>
                            <h5><span style="color:#00a1dc;"><a href="@{_contestDetailLink}@" target="_blank">@{contestDetail.title}@</a></span> 参赛作品列表</h5>
                        </header>
                        <div id="collapse4" class="body">
                            <div class="form-group" style="display: none;">
                                <div class="col-lg-3">
                                    <select class="form-control ng-pristine ng-untouched ng-valid">
                                        <option value="0">未上线</option>
                                        <option value="1">进行中</option>
                                        <option value="2">已结束</option>
                                    </select>
                                </div>
                                <div class="col-lg-3">
                                    <select class="form-control ng-pristine ng-untouched ng-valid">
                                        <option value="0">公开邀请赛</option>
                                        <option value="1">常规赛</option>
                                        <option value="2">私赛</option>
                                    </select>
                                </div>
                                <form class="bs-example bs-example-form" role="form">
                                    <div class="row">
                                        <div class="col-lg-3">
                                            <div class="input-group">
                                                <input type="text" class="form-control">
                                                <span class="input-group-btn">
                                                    <button class="btn btn-default" type="button">搜索</button>
                                                </span>
                                            </div><!-- /input-group -->
                                        </div><!-- /.col-lg-4 -->
                                    </div><!-- /.row -->
                                </form>
                            </div>


                            <div class="row">
                                <div class="col-lg-12">

                                    <header style="display: none;">
                                        <div class="icons"><i class="fa icon-table"></i></div>
                                        <h5>大赛列表</h5>
                                    </header>

                                    <!--Begin Datatables 表格数据 -->
                                    <div id="collapse4" class="body">
                                        <div class="search-form-comp">
                                            <div class="form-horizontal" id="userForm2">
                                                <div class="form-group">
                                                    <div>
                                                        <label for="cp2" class="control-label col-lg-1">类别：</label>
                                                        <div class="col-lg-2">
                                                            <select class="form-control" data-tag="select" ng-model="searchResult.categoryId"
                                                                    ng-options="x.id as x.name for x in contestDetail.contestCategorys" ng-change="refreshWorkMaintenanceList()">
                                                                <option value="">-- 全部 --</option>
                                                            </select>

                                                        </div>
                                                    </div>
                                                    <div>
                                                        <label for="cp2" class="control-label col-lg-1">阶段：</label>
                                                        <div class="col-lg-2">
                                                            <select class="form-control" data-tag="select" ng-model="searchResult.stepId"
                                                                    ng-options="x.id as x.name for x in contestDetail.contestSteps" ng-change="refreshWorkMaintenanceList()">
                                                                <option value="">-- 全部 --</option>
                                                            </select>
                                                        </div>
                                                    </div>
                                                    <div>
                                                        <label for="cp2" class="control-label col-lg-1">作品状态：</label>
                                                        <div class="col-lg-2">
                                                            <select class="form-control ng-pristine ng-untouched ng-valid" ng-model="searchResult.privacy" ng-change="refreshWorkMaintenanceList()">
                                                                <option value="">-- 全部 --</option>
                                                                <option value="1">公开</option>
                                                                <option value="2">隐藏</option>
                                                            </select>
                                                        </div>
                                                    </div>
                                                    <div>
                                                        <label for="cp2" class="control-label col-lg-1">用户举报：</label>
                                                        <div class="col-lg-2">
                                                            <select class="form-control ng-pristine ng-untouched ng-valid" ng-model="searchResult.state" ng-change="refreshWorkMaintenanceList()">
                                                                <option value="">-- 全部 --</option>
                                                                <option value="1">被举报</option>
                                                                <option value="0">正常</option>
                                                            </select>
                                                        </div>
                                                    </div>

                                                </div>
                                            </div>
                                            <div class="form-horizontal" id="userForm">
                                                <div class="form-group">
                                                    <label for="cp2" class="control-label col-lg-1"></label>

                                                    <div class="col-lg-3">
                                                        <div class="input-group">

                                                            <div class="input-group-btn">
                                                                <button type="button" class="btn btn-default
                     dropdown-toggle" data-toggle="dropdown" id="searh-type">
                                                                    @{searchResult.queryNameShow || '查询类别' }@
                                                                    <span class="caret"></span>
                                                                </button>
                                                                <ul class="dropdown-menu pull-right">
                                                                    <li><a href="#" ng-click='setSearchType("userName", "用户姓名")' value="userId">姓名</a></li>
                                                                    <li><a href="#" ng-click='setSearchType("userId", "用户Id")' value="userName">用户ID</a></li>
                                                                    <li><a href="#" ng-click='setSearchType("resourceTitle", "作品名")' value="workName">作品名</a></li>
                                                                    <li><a href="#" ng-click='setSearchType("resourceId", "作品ID")' value="workId">作品ID</a></li>
                                                                    <li><a href="#" ng-click='setSearchType("phone", "手机号码")' value="phoneNumber">手机号码</a></li>
                                                                    <li><a href="#" ng-click='setSearchType("email", "邮箱")' value="email">邮箱</a></li>
                                                                    <li class=""><a href="#" ng-click='setSearchType("prizeId", "奖项")' value="email">奖项</a></li>
                                                                </ul>
                                                            </div>
                                                            <input type="text" class="form-control" ng-class="{'hide':searchResult.queryName == 'prizeId'}" ng-model="searchResult.queryValue"><!-- /btn-group -->
                                                            <select class="form-control ng-pristine ng-untouched ng-valid contest-prize" ng-class="{'hide':searchResult.queryName!= 'prizeId'}" ng-model="searchResult.prizeId" ng-options="x.id as x.name for x in contestDetail.prizes" ng-change="getWorkMaintenanceList()">
                                                                <option value="">-- 全部 --</option>
                                                            </select>

                                                        </div><!-- /input-group -->

                                                    </div>
                                                    <div class="center-block" style="float: left;">
                                                        <button ng-click="getWorkMaintenanceList()" class="btn btn-primary" ng-class="{'hide':searchResult.queryName == 'prizeId'}" style="background-color: #00b7ef">查询</button>
                                                        <button ng-click="resetSearch()" class="btn btn-primary" ng-class="{'hide':searchResult.queryName == 'prizeId'}" style="background-color: #00b7ef;margin-left: 10px;">清空查询</button>
                                                        <!--<a href="#" id="addPermission" class="btn btn-metis-2" data-original-title="" title="" data-toggle="modal" ng-click="edit_user()">新增</a>-->
                                                    </div>
                                                    <!--<div>-->
                                                        <!--<label for="cp2" class="control-label col-lg-1">勋章：</label>-->
                                                        <!--<div class="col-lg-2">-->
                                                            <!--<select class="form-control ng-pristine ng-untouched ng-valid" ng-model="searchResult.medal" ng-change="refreshWorkMaintenanceList()">-->
                                                                <!--<option value="">-- 全部 --</option>-->
                                                                <!--<option value="1">已获取荣誉</option>-->
                                                                <!--<option value="2">未获取荣誉</option>-->
                                                            <!--</select>-->
                                                        <!--</div>-->
                                                    <!--</div>-->
                                                </div>
                                            </div>

                                            <div class="form-horizontal hide" id="userForm">
                                                <div class="form-group" style="margin-left: 0">
                                                    <button ng-click="" class="btn btn-primary col-lg-1" style="background-color: #5bc0de;margin-right: 20px;margin-left: 20px;">导出此页图片</button>
                                                    <button ng-click="" class="btn btn-primary col-lg-1" style="background-color: #5bc0de;margin-right: 20px;">公开此页作品</button>
                                                    <button ng-click="" class="btn btn-primary col-lg-1" style="background-color: #5bc0de;margin-right: 20px;">导出数据</button>
                                                </div>
                                            </div>

                                            <div class="hide" id="export-iframe">
                                            </div>

                                            <div class="form-horizontal" id="userForm">
                                                <div class="form-group" style="margin-left: 0">
                                                    <button ng-click="exportExcel()" class="btn btn-primary col-lg-1" style="background-color: #5bc0de;margin-right: 20px;">导出作品表格</button>
                                                </div>

                                            </div>
                                        </div>


                                        <table id="dataTable" class="table table-bordered table-condensed table-hover table-striped workmaintenance-lx">
                                            <tbody>
                                            </tbody>
                                        </table>
                                    </div>
                                    <!-- /.row -->


                                    <!--Begin：查看详细信息 -->
                                    <div class="modal fade" id="myModal" tabindex="-1" role="dialog"
                                         aria-labelledby="myModalLabel" aria-hidden="true">
                                        <div class="modal-dialog-lg">
                                            <div class="modal-content clearfix">
                                                <div class="modal-header">
                                                    <button type="button" class="close"
                                                            data-dismiss="modal" aria-hidden="true">
                                                        &times;
                                                    </button>
                                                    <h4 class="modal-title" id="myModalLabel">
                                                        作品详情
                                                    </h4>
                                                </div>
                                                <div class="modal-body">

                                                    <div class="form-horizontal" id="userForm2">
                                                        <div>
                                                            <!--  left   -->
                                                            <div class="left-block">
                                                                <div class="form-group">
                                                                    <label for="cp2" class="control-label col-lg-3">姓名:</label>
                                                                    <div class="col-lg-7">
                                                                        <label for="" class="control-label">@{detail.user.nickName}@</label>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="cp2" class="control-label col-lg-3">院校:</label>
                                                                    <div class="col-lg-7">
                                                                        <label for="" class="control-label">@{detail.user.unit}@</label>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="cp2" class="control-label col-lg-3">专业:</label>
                                                                    <div class="col-lg-7" >
                                                                        <label for="" class="control-label">@{detail.user.field}@</label>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group hide">
                                                                    <label for="cp2" class="control-label col-lg-3">职业:</label>
                                                                    <div class="col-lg-7" >
                                                                        <input class="form-control" disabled></input>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="cp2" class="control-label col-lg-3">地址:</label>
                                                                    <div class="col-lg-9" >
                                                                        <label for="" style="word-wrap: break-word;text-align: left" class="control-label" title="@{detail.address}@">@{detail.address}@</label>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="cp2" class="control-label col-lg-3">作品名:</label>
                                                                    <div class="col-lg-7">
                                                                        <label for="" class="control-label">@{detail.title}@</label>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="cp2" class="control-label col-lg-3">图片数:</label>
                                                                    <div class="col-lg-7">
                                                                        <label for="" class="control-label">@{detail.picCount}@</label>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="cp2" class="control-label col-lg-3">提交日期:</label>
                                                                    <div class="col-lg-7">
                                                                        <label for="" class="control-label">@{detail.createdTime}@</label>
                                                                    </div>
                                                                </div>

                                                            </div><!--  /.left  -->



                                                        </div>


                                                    </div>
                                                    <div class="modal-footer">
                                                        <button type="button" class="btn btn-default"
                                                                data-dismiss="modal">关闭
                                                        </button>
                                                        <!--<button type="button" class="btn btn-primary btn-submit" ng-click="">-->
                                                        <!--保存-->
                                                        <!--</button>-->
                                                    </div>
                                                </div><!-- /.modal-content -->
                                            </div>
                                            <!-- /.BODY -->
                                        </div>
                                        <!-- /.box -->
                                    </div>

                                    <!--End 查看详细信息 -->



                                    <!--Begin：奖项设置 -->
                                    <div class="modal fade" id="myModal-prize-set" tabindex="-1" role="dialog"
                                         aria-labelledby="myModalLabel" aria-hidden="true">
                                        <div class="modal-dialog-lg">
                                            <div class="modal-content clearfix">
                                                <div class="modal-header">
                                                    <button type="button" class="close"
                                                            data-dismiss="modal" aria-hidden="true">
                                                        &times;
                                                    </button>
                                                    <h4 class="modal-title" id="myModalLabel-work-name">
                                                        作品<span style="color: blue"><a href="@{_host}@/community/photo-details/@{resource_prizeTable.id}@" target="_blank">@{resource_prizeTable.title}@</a></span>已获奖项
                                                    </h4>

                                                </div>
                                                <div class="modal-body">
                                                    <div class="form-horizontal">
                                                        <div class="form-group">
                                                            <div class="col-lg-2">
                                                                <select class="form-control ng-pristine ng-untouched ng-valid" ng-model="objAddPrize.stepId" ng-options="x.id as x.name for x in cur_contest.contestSteps">
                                                                    <option value="">-- 请选择 --</option>
                                                                </select>
                                                            </div>
                                                            <div class="col-lg-2">
                                                                <select class="form-control ng-pristine ng-untouched ng-valid" ng-model="objAddPrize.categoryId" ng-options="x.id as x.name for x in cur_contest.contestCategorys" ng-change="select_category()">
                                                                    <option value="">-- 请选择 --</option>
                                                                </select>
                                                            </div>
                                                            <div class="col-lg-2">
                                                                <select class="form-control ng-pristine ng-untouched ng-valid" ng-model="objAddPrize.prizeId" ng-options="x.id as x.name for x in cur_prizes" ng-change="validIsSelectCate()">
                                                                    <option value="">-- 请选择 --</option>
                                                                </select>
                                                            </div>
                                                            <button ng-click="addPrize()" class="btn btn-primary" style="background-color: #00b7ef">添加</button>
                                                        </div>
                                                    </div>

                                                    <table id="dataTable-prize-list" class="table table-bordered table-condensed table-hover table-striped workmaintenance-lx">
                                                        <tbody>
                                                        </tbody>
                                                    </table>

                                                    <div class="modal-footer">
                                                        <button type="button" class="btn btn-default" ng-click="closePrizeSetWin()"
                                                        >关闭
                                                        </button>
                                                        <!--<button type="button" class="btn btn-primary btn-submit" ng-click="">-->
                                                        <!--保存-->
                                                        <!--</button>-->
                                                    </div>
                                                </div><!-- /.modal-content -->
                                            </div>
                                            <!-- /.BODY -->
                                        </div>
                                        <!-- /.box -->
                                    </div>

                                    <!--End 奖项设置 -->










                                </div>
                            </div>










                        </div>
                    </div>
                </div>


                <link rel="stylesheet" href="/lib/bootstrap-tagsinput-master/src/bootstrap-tagsinput.css">
                <link rel="stylesheet" href="/lib/bootstrap-datetimepicker-master/css/bootstrap-datetimepicker.css">
                <script type="text/javascript" src="/js/angular.min.js"></script>
                <script type="text/javascript" src="/js/app.js"></script>

                <link rel="stylesheet" href="/css/contest/main.css"/>


                <link rel="stylesheet"
                      href="/contest_public/assets/lib/dataTables/css/dataTables.bootstrap.css"/>
                <script src="/contest_public/assets/lib/dataTables/js/jquery.dataTables.js" type="text/javascript"></script>
                <script src="/contest_public/assets/lib/dataTables/js/dataTables.bootstrap.js" type="text/javascript"></script>
                <script type="text/javascript" src="/js/contest/workmaintenance.js"></script>

            </div><!-- /.row -->
        </div>
    </div><!-- /.outer -->
</div><!-- /#content -->